#include <bits/stdc++.h>
using namespace std;



struct   stu {
  int num;
  double score;
};
stu s[1000000];

bool cmp(stu a, stu b) {
  if (a.score != b.score) return a.score > b.score;
  else return a.num < b.num;
}
int main() {
  sort(  s+1, s+n+1,cmp);
  return 0;
}
